package com.test.design.gczms.observer.impl;

import com.test.design.gczms.common.ObjDto;
import com.test.design.gczms.observer.Observer;

/**
 * @program: design-patternz
 * @description: 观察者1
 * @author: <a href="mailto:zhengjiaming@gtmap.cn">zhengjiaming</a>
 * @create: 2025-03-11 14:21
 **/
public class Observer1 implements Observer {
    private String name;

    @Override
    public String update(String id) {
        return id;
    }

    @Override
    public ObjDto update(ObjDto objDto) {
        objDto.setName("李四");
        return objDto;
    }

    @Override
    public Boolean update() {
        return this.name.equals("1");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}
